| Conditions | 2 | 
| Total Lines | 11 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | import {Inject} from '@nestjs/common'; | ||
| 16 | |||
| 17 |   public async execute(command: CreateTaskCommand): Promise<string> { | ||
| 18 |     const {name} = command; | ||
| 19 | |||
| 20 |     if (true === (await this.isTaskAlreadyExist.isSatisfiedBy(name))) { | ||
| 21 | throw new TaskAlreadyExistException(); | ||
| 22 | } | ||
| 23 | |||
| 24 | const task = await this.taskRepository.save(new Task(name)); | ||
| 25 | |||
| 26 | return task.getId(); | ||
| 27 | } | ||
| 29 |